import { Component, OnInit } from '@angular/core';
import {ReadingNotesService} from './reading-notes.service'
@Component({
  selector: 'app-reading-notes',
  templateUrl: './reading-notes.component.html',
  styleUrls: ['./reading-notes.component.scss'],
  providers:[ReadingNotesService]
})
export class ReadingNotesComponent implements OnInit {

  // 数据
  public listData:any ={
    sContent:''
  };
  constructor(
    public readingNotesService:ReadingNotesService
  ) { }

  ngOnInit() {
    this.loadlist();
  }


  // 加载数据
  loadlist(){
   this.readingNotesService.list().subscribe((data)=>{
      if(data){
        this.listData = data
      }
   })
  }
}
